package com.sgb.goods.view.activity.details.order;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.databinding.GoodsActivityAppointInfoBinding;
import com.sgb.goods.utils.Constants;
import com.sgb.goods.utils.base.BaseActivity;
import com.sgb.goods.viewmodel.AppointInfoModel;

/**
 * 约定信息
 * @author cyj
 */
@Route(path = Constants.ARouter.AR_APPOINT_INFO)
public class AppointInfoActivity extends BaseActivity<GoodsActivityAppointInfoBinding, AppointInfoModel> {

    @Override
    protected int getLayoutResId() {
        return R.layout.goods_activity_appoint_info;
    }

    @Override
    protected void initViewModel() {
        mViewModel = createViewModel(AppointInfoModel.class, BR.viewModel);
    }

    @Override
    protected void init() {
        mDataBinding.head.title.setText("约定信息");
        mViewModel.findAppoint(getIntent().getStringExtra("orderId"));
    }

    @Override
    protected void initListener() {
        mDataBinding.head.ivBack.setOnClickListener(v -> finish());
    }
}